package com.zhangwei.fresco.apdater;

import android.content.Context;
import android.view.ViewGroup;

import com.zhangwei.fresco.base.RecyclerViewAdapterBase;
import com.zhangwei.fresco.base.ViewWrapper;
import com.zhangwei.fresco.bean.HomeItems;

import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;

/**
 * @version V1.0
 * @description:
 * @title: Expands
 * @package com.zhangwei.fresco.apdater
 * @author: zhangwei
 * @date: 2015-12-24 下午4:22
 */
@EBean
public class CommAdapter extends RecyclerViewAdapterBase<HomeItems, CommItemView> {
    @RootContext
    Context context;

    @Override
    protected CommItemView onCreateItemView(ViewGroup parent, int viewType) {
        return CommItemView_.build(context);
    }

    @Override
    public void onBindViewHolder(ViewWrapper<CommItemView> holder, int position) {
        CommItemView view = holder.getView();
        view.bind(items.get(position));
    }
}
